<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= $systemConfig['system_name'] ?? '实名认证分发系统' ?></title>
<link rel="stylesheet" href="/layui/css/layui.css">
<script src="/static/js/jquery.min.js"></script>
<script src="/layui/layui.js"></script>
<style>
*{margin:0;padding:0;box-sizing:border-box;}
body{font-family:"Microsoft YaHei","PingFang SC",sans-serif;background:#f5f7fa;}
.header{background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.08);position:sticky;top:0;z-index:100;}
.header .inner{max-width:1200px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:0 20px;height:60px;}
.header .logo{font-size:20px;font-weight:700;color:#1e3c72;text-decoration:none;}
.header .nav{display:flex;gap:20px;}
.header .nav a{color:#555;text-decoration:none;font-size:14px;padding:8px 12px;border-radius:4px;transition:all .3s;}
.header .nav a:hover{color:#1e9fff;background:#f0f7ff;}
.header .nav .btn{background:#1e9fff;color:#fff;padding:8px 20px;border-radius:4px;}
.header .nav .btn:hover{background:#1890ff;color:#fff;}
.footer{text-align:center;padding:30px 20px;color:#999;font-size:13px;background:#fff;margin-top:40px;border-top:1px solid #eee;}
.container{max-width:1200px;margin:0 auto;padding:20px;}
</style>
</head>
<body>
<div class="header">
    <div class="inner">
        <a href="/" class="logo"><?= $systemConfig['system_name'] ?? '实名认证分发系统' ?></a>
        <div class="nav">
            <a href="/">首页</a>
            <a href="/user/index/packages">套餐市场</a>
            <a href="/user/index/apiDoc">接入文档</a>
            <?php if($userId): ?>
            <a href="/user/index/dashboard">控制台</a>
            <a href="/user/index/profile"><?= $userInfo['nickname'] ?? $userInfo['username'] ?></a>
            <a href="/user/index/logout">退出</a>
            <?php else: ?>
            <a href="/user/index/login">登录</a>
            <a href="/user/index/register" class="btn">免费注册</a>
            <?php endif; ?>
        </div>
    </div>
</div>
